import { createRouter, createWebHistory } from 'vue-router'
import Layout from "../layout/Layout";

const routes = [
  {
    path: '/',
    name: 'Layout',
    redirect:"user",
    component: Layout,
    children:[
      {
        path:'user',
        name:'user',
        component:() => import("@/views/User")
      },
      // {
      //   path: 'car',
      //   name: 'car',
      //   component: () => import("@/views/Car")
      // },
      {
        path: 'person',
        name: 'Person',
        component: () => import("@/views/Person")
      },
      {
        path: 'password',
        name: 'Password',
        component: () => import("@/views/Password")
      },
      {
        path:'dashboard',
        name:'Dashboard',
        component:() => import("@/views/Dashboard")
      },
      // {
      //   path:'movie',
      //   name:'movie',
      //   component:() => import("@/views/movie")
      // },
      {
        path:'Venues',
        name:'Venues',
        component:() => import("@/views/Venues")
      },
      {
        path:'Notifications',
        name:'Notifications',
        component:() => import("@/views/Notifications")
      },
      {
        path:'Reservations',
        name:'Reservations',
        component:() => import("@/views/Reservations")
      },
      {
        path:'ReportData',
        name:'ReportData',
        component:() => import("@/views/ReportData")
      },
      // {
      //   path:'Reports',
      //   name:'Reports',
      //   component:() => import("@/views/Reports")
      // },
      {
        path:'MyReserations',
        name:'MyReserations',
        component:() => import("@/views/Reservations")
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import("@/views/Login")
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import("@/views/Register")
  },
  // {
  //   path: '/users',
  //   name: 'users',
  //   component: () => import("@/views/users")
  // },


]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
